﻿using Service;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace App.Forms
{
    public partial class BalanceEnquiry : Form
    {
        public BalanceEnquiry()
        {
            InitializeComponent();
        }

        private void BalanceEnquiry_Load(object sender, EventArgs e)
        {
            TaskManager tm = new TaskManager();
           // Model.CurrentSession cs=new Model.CurrentSession();
            double balance = tm.CheckBalance(Model.CurrentSession.currentAccount);
            lblmsg.Text = balance>0?"Your available balance: $" + balance:"No such account exists";
            lblAccount.Text = "Account Number: " + Model.CurrentSession.currentAccount.AccountNumber + " (" + Model.CurrentSession.accountType + " account)";
        }

        private void lblmsg_Click(object sender, EventArgs e)
        {

        }

        private void lblAccount_Click(object sender, EventArgs e)
        {

        }
    }
}
